#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include<weatherData.h>
#include <QMainWindow>
#include<QMouseEvent>
#include<QJsonDocument>
#include<QJsonObject>
#include<QJsonArray>
#include<QNetworkAccessManager>
#include<QNetworkReply>
#include<QLabel>
#include<QList>
#include"mybutton.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void contextMenuEvent(QContextMenuEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    QNetworkAccessManager *NetworkManager;
    void onreplied(QNetworkReply *reply);
    QPoint moffset;
    void getweatherInof(QString cityCode);
    void parsejson(QByteArray ayyay);
    void updateUi();
    void paintEvent(QPaintEvent *event);
    //重写父类的enventfilter
    bool eventFilter(QObject *watched, QEvent *event);
    mybutton *mybtn;
    //
    void painthighcurce();
private slots:


private:
    Ui::MainWindow *ui;
    QMenu *exitmenu;
    QAction *exitact;
    Today mTody;
    Day mDay[6];
    QList<QLabel*>mywWeekist;
    QList<QLabel*>myDateList;
    QList<QLabel*>mytypeList;
    QList<QLabel*>mytypeIconList;
    QList<QLabel*>myAqiList;
    QList<QLabel*>myFxList;
    QList<QLabel*>myFlList;
    QMap<QString,QString>mtype;
};
#endif // MAINWINDOW_H
